package com.example.entity;

import cn.idev.excel.annotation.ExcelIgnore;
import cn.idev.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.write.style.ColumnWidth;
import cn.idev.excel.annotation.write.style.ContentRowHeight;
import cn.idev.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;

import java.util.List;

/**
 * 部门信息（EasyExcel 导出）
 */
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(20)
@Data
public class Department {

    @ExcelProperty("ID")
    private Integer id;

    @ExcelProperty("部门名称")
    private String name;

    @ExcelProperty("部门编号")
    private String code;

    @ExcelProperty("地址")
    private String address;

    @ExcelProperty("父级ID")
    private Integer pid;

    @ExcelProperty("层级")
    private Integer level;

    @ExcelIgnore
    private String parentName;

    /* 子部门：仅业务使用，不导出 */
    @ExcelIgnore
    private List<Department> children;
}